package com.lvcoding.spring5.annotation3x.config;

import com.lvcoding.spring5.annotation3x.bean.Customer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

/**
 * @Description 描述
 * @Date 2020-07-23 4:39 下午
 * @Author wuyanshen
 */
@ComponentScan(basePackages = "com.lvcoding.spring5.annotation3x.bean")
@ImportResource("application.xml")
@Configuration
public class AppConfig4 {

    @Bean
    public Customer customer(){
        Customer customer = new Customer();
        customer.setId(1);
        customer.setName("xiaohong");
        return customer;
    }
}
